//导入请求头 (request里的index.js 的 axios)
import service from "..";

//获取首页轮播图的数据
export function getBanner(){
    //返回 service  (相当于 axios)
    return service({
        method:"GET",
        url:"/banner?type=2"
    })
}

//获取发现好歌单
export function getMusicList(){
    return service({
        method:"GET",
        url:"/personalized?limit=10" //返回10条歌单
    })
}

//所搜
export function getSearchMusic(data){
    return service({
        method:"GET",
        url:`/search?keywords=${data}`
    })
}

//登录
export function getPhoneLoggin(data){
    return service({
        method:"GET",
        url:`/login/cellphone?phone=${data.phone}&password=${data.password}`
    })
}

//获取用户信息详情
export function getLoginUser(data){
    return service({
        method:"GET",
        url:`/user/detail?uid=${data}`
    })
}
